package com.bilibili.server.controller;

import com.bilibili.server.service.BaiduService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author HuangRongFu
 * 2021/11/25 星期四7:54 下午
 */

@RestController
@RequestMapping("/baidu")
public class BaiduController {

    @Autowired
    private BaiduService baiduService;


    /**
     * 上报地理位置
     * @param paramMap
     * @Return: ResponseEntity
     */
    @PostMapping("/location")
    public ResponseEntity location(@RequestBody Map<String, Object> paramMap){

        baiduService.uploadLocation(paramMap);

        return ResponseEntity.ok(null);
    }
}
